package cn.stylefeng.guns.sys.modular.system.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.sys.modular.system.entity.ZxTzqk;
import cn.stylefeng.guns.sys.modular.system.model.params.ZxTzqkParam;
import cn.stylefeng.guns.sys.modular.system.model.result.ZxTzqkResult;
import cn.stylefeng.guns.sys.modular.system.model.result.ZxTzqkViewResult;
import cn.stylefeng.roses.core.reqres.response.ResponseData;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.poi.ss.usermodel.Sheet;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jiangge
 * @since 2020-11-20
 */
public interface ZxTzqkService extends IService<ZxTzqk> {

    /**
     * 新增
     *
     * @author jiangge
     * @Date 2020-11-20
     */
    void add(ZxTzqkParam param);

    /**
     * 删除
     *
     * @author jiangge
     * @Date 2020-11-20
     */
    void delete(ZxTzqkParam param);

    /**
     * 更新
     *
     * @author jiangge
     * @Date 2020-11-20
     */
    void update(ZxTzqkParam param);

    void editTzqk(ZxTzqkParam param);
    /**
     * 查询单条数据，Specification模式
     *
     * @author jiangge
     * @Date 2020-11-20
     */
    ZxTzqkResult findBySpec(ZxTzqkParam param);

    /**
     * 查询列表，Specification模式
     *
     * @author jiangge
     * @Date 2020-11-20
     */
    List<ZxTzqkResult> findListBySpec(ZxTzqkParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author jiangge
     * @Date 2020-11-20
     */
     LayuiPageInfo findPageBySpec(ZxTzqkParam param);

    ZxTzqk selectOneByParam(ZxTzqkParam zxTzqkParam);

    ZxTzqkResult selectTzqkByParam(ZxTzqkParam param1);

    ResponseData batchImport(String fileName, MultipartFile file) throws Exception ;

    void updateJineHeJi(Long mdzxId);

    /**
     * 更新所有门店的金额合计
     */
    void updateAllMdJineHeJi();

    ResponseData obtainFromBaoxiaodan(ZxTzqkViewResult param);

    ResponseData obtainAllFromBaoxiaodan(ZxTzqkViewResult param);

    ResponseData batchImport_md_tzqk(String fileName, MultipartFile file) throws Exception;

    @Transactional(rollbackFor = Exception.class)
    ResponseData mdtzqkHander(Sheet sheet);

    ResponseData importMdTzCb(MultipartFile file) throws Exception;

    ResponseData batchImportMdTzCb() throws Exception;

    ResponseData onClickobtainAll(ZxTzqkViewResult param);

    ResponseData duizhangTongbu();
}
